<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>企业基础信息维护</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="../../../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" href="../../../static/udi/dist/css/layui.css" th:href="@{/udi/dist/css/layui.css}">
    <link href="../../../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="../../../static/ajax/libs/bootstrap-table/bootstrap-table.min.css" th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
    <link href="../../../static/css/animate.css" th:href="@{/css/animate.css}" rel="stylesheet"/>
    <link href="../../../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../../../static/udi/css/jt-ui.css" th:href="@{/udi/css/jt-ui.css}" rel="stylesheet"/>
    <style>
        div.xrequired:before {
            content: '*';
            color: red;
        }
        .span {
            position:relative;
            padding:5px;
        }
        .tip {
            display:block;
            background:#f00;
            border-radius:50%;
            width:8px;
            height:8px;
            top:0px;
            right:0px;
            position:absolute;
        }
    </style>
</head>
<body>
<div class="container-div gray-bg">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse" shiro:hasPermission="base:corp:add">
                <form id="corp-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                企业名称：<input type="text" id="deptName" name="deptName" autocomplete="off"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <div class="btn-group-sm  col-sm-12" id="toolbar" role="group">
                    <a class="btn btn-success btn-sm" onclick="$.operate.add()" shiro:hasPermission="base:corp:add">
                        <i class="fa fa-plus"></i> 新增
                    </a>
                    <a class="btn btn-primary single disabled" onclick="$.operate.edit()"  shiro:hasPermission="base:corp:edit">
                        <i class="fa fa-edit"></i> 修改
                    </a>
                    <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="base:corp:del">
                        <i class="fa fa-remove"></i> 删除
                    </a>
                </div>
                <div>
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../../../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../../../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
<script src="../../../static/ajax/libs/bootstrap-table/bootstrap-table.min.js" th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js}"></script>
<script src="../../../static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<script src="../../../static/udi/dist/layui.js" th:src="@{/udi/dist/layui.js}"></script>
<script src="../../../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../../../static/udi/js/common.js" th:src="@{/udi/js/common.js}"></script>
<script src="../../../static/udi/js/jt-ui.js" th:src="@{/udi/js/jt-ui.js}"></script>
<script th:inline="javascript">
    /*获取权限标识，如果没有权限就赋值hidden*/
    var editFlag = [[${@permission.hasPermi('base:corp:edit')}]];
    var removeFlag = [[${@permission.hasPermi('base:corp:del')}]];
    //var datas = [[${@dict.getType('sys_normal_disable')}]];
    var prefix = "/base";
    $(function() {
        var options = {
            url: prefix+"/corp_list",
            createUrl: prefix + "/add_corp",
            updateUrl: prefix + "/edit_corp/{id}",
            removeUrl: prefix + "/corp_del",
            detailUrl: prefix + "/detail_corp",
            sortName: "id",
            modalName: "企业基本信息维护",
            columns: [{
                checkbox: true
                },
                {
                    field: 'id',
                    title: '序号'
                },
                /*{title: '操作', align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-info btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-plus-square"></i>&nbsp;详情</a> ');
                        return actions.join();
                    }
                },*/
                {
                    field: 'deptName',
                    title: '企业名称',
                    sortable: true
                },
                {
                    field: 'tyshxydm',
                    title: '统一社会信用代码',
                    sortable: true
                },
                {
                    field: 'corpCode',title: '发码机构统一分发的企业码',align: 'center'
                },
                {
                    field: 'addTime',
                    title: '添加时间',
                    sortable: true
                }]
        };
        $.table.init(options);
    })
    //时间戳
    function getcurrent_time() {
        var date = new Date();
        var year = date.getFullYear(); //获取当前年份
        var mon = date.getMonth() + 1;
        var month;
        mon > 9 ? month = mon : month ="0"+ mon; //获取当前月份
        var da = date.getDate(); //获取当前日
        var day;
        da > 9? day = da : day = "0" + da;
       // var day = date.getDay(); //获取当前星期几
        var h = date.getHours(); //获取小时
        var hour;
        h > 9? hour = h : hour = "0" + h;
        var m = date.getMinutes(); //获取分钟
        var miu;
        m > 9? miu = m : miu = "0" + m;
        var s = date.getSeconds(); //获取秒
        var sec;
        s > 9? sec = s : sec = "0" + s;
        var d = year + '-' + month + '-' + da + ' ' + hour + ':' + miu + ':' + sec;
        return  d;
    }

</script>
</body>
</html>